package com.weiqiao.mall.constant.e;

public class CommodityLogRemarkEnum {

    //商品操作日志的备注
    public enum CommodityLogRemark {
        A(0, "新建商品"),
        B(1, "修改销量"),
        C(2, "商品上架"),
        D(3, "商品下架"),
        E(4, "商品置顶"),
        F(5, "修改商品信息"),
        G(6, "新建秒杀"),
        H(7, "设置秒杀"),
        I(8, "删除秒杀"),
        J(9, "新建拼团"),
        K(10, "修改拼团"),
        L(11, "失效拼团"),
        M(12, "删除拼团"),
        N(13, "删除商品"),
        O(14, "失效秒杀"),
        P(15, "新建专区商品"),
        Q(16, "修改专区商品"),
        R(17, "删除专区商品"),
        S(18, "取消置顶");

        CommodityLogRemark(int value, String name) {
            this.value = value;
            this.name = name;
        }

        private int value;
        private String name;

        public int getValue() {
            return this.value;
        }

        public String getName() {
            return name;
        }

        public static String getNameByValue(Integer value) {
            CommodityLogRemark[] status = CommodityLogRemark.values();
            for (CommodityLogRemark p : status) {
                if (null != value && p.value == value) {
                    return p.name;
                }
            }
            return null;
        }
    }
}
